<include file="Common:header" />
<css file="__PUBLIC__/css/redmond/jquery-ui-1.10.0.custom.css"/>
<js file="__PUBLIC__/js/jquery-1.8.2.min.js" /> 
<js file="__PUBLIC__/js/jquery-ui-1.10.0.custom.min.js"/>
<css file="__PUBLIC__/Admin/css/addshow.css" />
<script>
    $(function() {
        $( "#tabs" ).tabs();
    });
     var goodsListPath = "{:U('index')}";
</script>
<js file="__PUBLIC__/Admin/js/addCategory.js" />
</head>
<body>
    <form action="{:U('runEditCategory')}" method="post">
            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1">编辑商品分类</a></li>
                </ul>
                <div id="tabs-1">
                    <table class="table2">
                        <tr>
                            <td width="75">商品分类名称</td>
                            <td>
                                <input type="text" class="w200" name="catename" value="{$editCate.name}"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td>所属商品分类</td>
                            <td>
                                <select name="pid">
                                    <option value="0" selected>顶级分类</option>
                                    <foreach name="parentCate" item="value">
                                        <if condition="$value['id'] eq $editCate['pid']">
                                        <option value="{$value.id}" selected>{$value.html}{$value.name}</option>
                                        <else/>
                                        <option value="{$value.id}">{$value.html}{$value.name}</option>
                                       </if>
                                    </foreach>
                                </select>
                            </td>
                        </tr>
                        <if condition="!isset($_GET['pid'])">
                        <tr>
                            <td>所属商品类型</td>
                            <td>
                                <select name="type" >
                                    <foreach name="type" item="val">
                                        <if condition="$editCate['tid'] eq 0">
                                            <option value="0" selected>顶级分类</option>
                                            
                                        <elseif condition="$editCate['tid'] eq $val['id']"/>
                                            <option value="{$val.id}" selected>{$val.name}</option>
                                        <else/>
                                            <option value="{$val.id}">{$val.name}</option>
                                        </if>
                                    </foreach>
                                </select>
                            </td>
                        </tr>
                         </if>
                        <tr>
                            <td>商品类型描述</td>
                            <td>
                                <textarea name="description" class="w300 h100"></textarea>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <input type="hidden" name="cid" value="{$Think.get.cid}">
                    <input type="submit" class="bt1" value="提交修改"/>
                    <input type="button" name="baclist" class="bt1" value="返回分类列表"/>
                </div>
            </div>

        </form>
</body>
</html>